@import "tailwindcss";
@import "fumadocs-ui/css/neutral.css";
@import "fumadocs-ui/css/preset.css";
@import "tw-animate-css";

@custom-variant dark (&:where(.dark, .dark *));

.react-tweet-theme {
	--tweet-container-margin: 0 !important;
	@apply bg-fd-background! border-none! h-full! border-transparent! w-full!;
	max-width: 100% !important;
	min-width: 0 !important;
}

.react-tweet-theme > * {
	max-width: 100% !important;
	width: 100% !important;
	min-width: 0 !important;
}

.react-tweet-theme img,
.react-tweet-theme video {
	max-width: 100% !important;
	height: auto !important;
}

.react-tweet-theme * {
	word-wrap: break-word !important;
	word-break: break-word !important;
	overflow-wrap: break-word !important;
}

.shiny-text {
	background: linear-gradient(
		120deg,
		rgba(255, 255, 255, 0) 40%,
		rgba(255, 255, 255, 0.8) 50%,
		rgba(255, 255, 255, 0) 60%
	);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	display: inline-block;
	animation: shine 5s linear infinite;
}

@keyframes shine {
	0% {
		background-position: 100%;
	}

	100% {
		background-position: -100%;
	}
}

.shiny-text.disabled {
	animation: none;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.animate-fadeIn {
	opacity: 0;
	animation: fadeInUp 0.5s ease-out forwards;
}

.border-beam {
	animation: border-beam 3s linear infinite;
}

@keyframes border-beam {
	0% {
		background-position: 0% 50%;
	}
	100% {
		background-position: 200% 50%;
	}
}

.no-scrollbar::-webkit-scrollbar {
	display: none;
}
.no-scrollbar {
	-ms-overflow-style: none;
	scrollbar-width: none;
}

@theme inline {
	--font-sans: var(--font-geist);
	--font-mono: var(--font-geist-mono);
	--radius-sm: calc(var(--radius) - 4px);
	--radius-md: calc(var(--radius) - 2px);
	--radius-lg: var(--radius);
	--radius-xl: calc(var(--radius) + 4px);
	--color-background: var(--background);
	--color-foreground: var(--foreground);
	--color-card: var(--card);
	--color-card-foreground: var(--card-foreground);
	--color-popover: var(--popover);
	--color-popover-foreground: var(--popover-foreground);
	--color-primary: var(--primary);
	--color-primary-foreground: var(--primary-foreground);
	--color-secondary: var(--secondary);
	--color-secondary-foreground: var(--secondary-foreground);
	--color-muted: var(--muted);
	--color-muted-foreground: var(--muted-foreground);
	--color-accent: var(--accent);
	--color-accent-foreground: var(--accent-foreground);
	--color-destructive: var(--destructive);
	--color-border: var(--border);
	--color-input: var(--input);
	--color-ring: var(--ring);
	--color-chart-1: var(--chart-1);
	--color-chart-2: var(--chart-2);
	--color-chart-3: var(--chart-3);
	--color-chart-4: var(--chart-4);
	--color-chart-5: var(--chart-5);
	--color-chart-6: var(--chart-6);
	--color-chart-7: var(--chart-7);
	--color-sidebar: var(--sidebar);
	--color-sidebar-foreground: var(--sidebar-foreground);
	--color-sidebar-primary: var(--sidebar-primary);
	--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
	--color-sidebar-accent: var(--sidebar-accent);
	--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
	--color-sidebar-border: var(--sidebar-border);
	--color-sidebar-ring: var(--sidebar-ring);
	--radius: 0.35rem;
	--tracking-tighter: calc(var(--tracking-normal) - 0.05em);
	--tracking-tight: calc(var(--tracking-normal) - 0.025em);
	--tracking-wide: calc(var(--tracking-normal) + 0.025em);
	--tracking-wider: calc(var(--tracking-normal) + 0.05em);
	--tracking-widest: calc(var(--tracking-normal) + 0.1em);
	--tracking-normal: var(--tracking-normal);
	--shadow-2xl: var(--shadow-2xl);
	--shadow-xl: var(--shadow-xl);
	--shadow-lg: var(--shadow-lg);
	--shadow-md: var(--shadow-md);
	--shadow: var(--shadow);
	--shadow-sm: var(--shadow-sm);
	--shadow-xs: var(--shadow-xs);
	--shadow-2xs: var(--shadow-2xs);
	--spacing: var(--spacing);
	--letter-spacing: var(--letter-spacing);
	--shadow-offset-y: var(--shadow-offset-y);
	--shadow-offset-x: var(--shadow-offset-x);
	--shadow-spread: var(--shadow-spread);
	--shadow-blur: var(--shadow-blur);
	--shadow-opacity: var(--shadow-opacity);
	--color-shadow-color: var(--shadow-color);
	--color-destructive-foreground: var(--destructive-foreground);
}

:root {
	--color-fd-primary: #8839ef;
	--color-fd-primary-foreground: #ffffff;
	--background: oklch(1 0 0);
	--foreground: oklch(0.44 0.04 279.33);
	--card: oklch(1 0 0);
	--card-foreground: oklch(0.44 0.04 279.33);
	--popover: oklch(0.86 0.01 268.48);
	--popover-foreground: oklch(0.44 0.04 279.33);
	--primary: #8839ef;
	--primary-foreground: #ffffff;
	--secondary: oklch(0.86 0.01 268.48);
	--secondary-foreground: oklch(0.44 0.04 279.33);
	--muted: oklch(0.91 0.01 264.51);
	--muted-foreground: oklch(0.55 0.03 279.08);
	--accent: #9353d3;
	--accent-foreground: #ffffff;
	--destructive: #d20f39;
	--border: oklch(0.81 0.02 271.2);
	--input: oklch(0.86 0.01 268.48);
	--ring: #8839ef;
	--chart-1: 12 76% 61%;
	--chart-2: 173 58% 39%;
	--chart-3: 197 37% 24%;
	--chart-4: 43 74% 66%;
	--chart-5: 27 87% 67%;
	--chart-6: 210 80% 55%;
	--chart-7: 330 75% 60%;
	--sidebar: oklch(0.93 0.01 264.52);
	--sidebar-foreground: oklch(0.44 0.04 279.33);
	--sidebar-primary: #8839ef;
	--sidebar-primary-foreground: #ffffff;
	--sidebar-accent: #9353d3;
	--sidebar-accent-foreground: #ffffff;
	--sidebar-border: oklch(0.81 0.02 271.2);
	--sidebar-ring: #8839ef;
	--destructive-foreground: oklch(1 0 0);
	--radius: 0.35rem;
	--shadow-color: hsl(240 30% 25%);
	--shadow-opacity: 0.12;
	--shadow-blur: 6px;
	--shadow-spread: 0px;
	--shadow-offset-x: 0px;
	--shadow-offset-y: 4px;
	--letter-spacing: 0em;
	--spacing: 0.25rem;
	--shadow-2xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
	--shadow-xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
	--shadow-sm:
		0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px
		hsl(240 30% 25% / 0.12);
	--shadow:
		0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px
		hsl(240 30% 25% / 0.12);
	--shadow-md:
		0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 2px 4px -1px
		hsl(240 30% 25% / 0.12);
	--shadow-lg:
		0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 4px 6px -1px
		hsl(240 30% 25% / 0.12);
	--shadow-xl:
		0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 8px 10px -1px
		hsl(240 30% 25% / 0.12);
	--shadow-2xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.3);
	--tracking-normal: 0em;
}

.dark {
	--color-fd-primary: #cba6f7;
	--color-fd-primary-foreground: #11111b;
	--color-fd-background: #0D0D0D;
	--background: #11111b;
	--foreground: #cdd6f4;
	--card: #11111b;
	--card-foreground: #cdd6f4;
	--popover: #181825;
	--popover-foreground: #cdd6f4;
	--primary: #cba6f7;
	--primary-foreground: #11111b;
	--secondary: #313244;
	--secondary-foreground: #cdd6f4;
	--muted: #313244;
	--muted-foreground: #a6adc8;
	--accent: #b4befe;
	--accent-foreground: #11111b;
	--destructive: #f38ba8;
	--border: #45475a;
	--input: #313244;
	--ring: #cba6f7;
	--chart-1: 220 70% 50%;
	--chart-2: 160 60% 45%;
	--chart-3: 30 80% 55%;
	--chart-4: 280 65% 60%;
	--chart-5: 340 75% 55%;
	--chart-6: 50 70% 50%;
	--chart-7: 100 60% 55%;
	--sidebar: #11111b;
	--sidebar-foreground: #cdd6f4;
	--sidebar-primary: #cba6f7;
	--sidebar-primary-foreground: #11111b;
	--sidebar-accent: #b4befe;
	--sidebar-accent-foreground: #11111b;
	--sidebar-border: #45475a;
	--sidebar-ring: #cba6f7;
	--destructive-foreground: #11111b;
	--radius: 0.35rem;
	--shadow-color: hsl(240 30% 5%);
	--shadow-opacity: 0.25;
	--shadow-blur: 8px;
	--shadow-spread: 0px;
	--shadow-offset-x: 0px;
	--shadow-offset-y: 4px;
	--letter-spacing: 0em;
	--spacing: 0.25rem;
	--shadow-2xs: 0px 2px 4px 0px hsl(240 30% 5% / 0.15);
	--shadow-xs: 0px 2px 4px 0px hsl(240 30% 5% / 0.15);
	--shadow-sm:
		0px 4px 8px 0px hsl(240 30% 5% / 0.2), 0px 1px 2px -1px
		hsl(240 30% 5% / 0.15);
	--shadow:
		0px 4px 8px 0px hsl(240 30% 5% / 0.2), 0px 1px 2px -1px
		hsl(240 30% 5% / 0.15);
	--shadow-md:
		0px 6px 12px 0px hsl(240 30% 5% / 0.25), 0px 2px 4px -1px
		hsl(240 30% 5% / 0.2);
	--shadow-lg:
		0px 8px 16px 0px hsl(240 30% 5% / 0.3), 0px 4px 6px -1px
		hsl(240 30% 5% / 0.25);
	--shadow-xl:
		0px 12px 24px 0px hsl(240 30% 5% / 0.35), 0px 8px 10px -1px
		hsl(240 30% 5% / 0.3);
	--shadow-2xl: 0px 16px 32px 0px hsl(240 30% 5% / 0.4);
}

/* @layer base {
	* {
		@apply border-border outline-ring/50;
	}
	body {
		@apply text-foreground;
		letter-spacing: var(--tracking-normal);
	}
} */

.terminal-cursor {
	animation: blink 1s infinite;
	border-right: 2px solid currentColor;
	padding-right: 2px;
}

@keyframes blink {
	0%,
	50% {
		border-color: transparent;
	}
	51%,
	100% {
		border-color: currentColor;
	}
}

.terminal-scanlines {
	position: relative;
}

.terminal-scanlines::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(
		0deg,
		transparent,
		transparent 2px,
		rgba(255, 255, 255, 0.03) 2px,
		rgba(255, 255, 255, 0.03) 4px
	);
	pointer-events: none;
}

.terminal-block-hover:hover {
	border-color: var(--primary);
	box-shadow: 0 0 10px rgba(136, 57, 239, 0.3);
	transform: translateY(-1px);
}

.ascii-art {
	font-family: "Courier New", monospace;
	line-height: 1;
	letter-spacing: 0;
}

.terminal-prompt::before {
	content: "> ";
	color: var(--primary);
	font-weight: bold;
}

.file-browser-item {
	transition: all 0.15s ease;
	position: relative;
}

.file-browser-item:hover {
	background-color: var(--accent);
	color: var(--accent-foreground);
	transform: translateX(2px);
}

.file-browser-item:hover .file-icon {
	filter: brightness(1.2);
}

.directory-header {
	position: relative;
	cursor: pointer;
}

.directory-header:hover {
	background-color: var(--muted);
}

@keyframes file-load {
	0% {
		opacity: 0;
		transform: translateX(-10px);
	}
	100% {
		opacity: 1;
		transform: translateX(0);
	}
}

.file-load-animation {
	animation: file-load 0.3s ease-out forwards;
}

/* Chart styling to match terminal aesthetic */
.recharts-wrapper {
	font-family: var(--font-mono);
}

.recharts-cartesian-axis-tick-value {
	font-size: 0.75rem;
	font-weight: 500;
	color: hsl(var(--muted-foreground));
}

.recharts-cartesian-axis-line {
	stroke: hsl(var(--border));
	stroke-width: 1;
}

.recharts-cartesian-grid-horizontal line,
.recharts-cartesian-grid-vertical line {
	stroke: hsl(var(--border));
	stroke-width: 1;
	stroke-dasharray: 3 3;
	opacity: 0.5;
}

.recharts-tooltip-wrapper {
	background: hsl(var(--popover));
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	padding: 0.5rem;
	font-family: var(--font-mono);
	font-size: 0.75rem;
}

.recharts-tooltip-item {
	color: hsl(var(--foreground));
}

.recharts-legend-item-text {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: hsl(var(--foreground));
}

.recharts-pie-label {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	font-weight: 500;
	color: hsl(var(--foreground));
}

.recharts-bar-rectangle {
	transition: opacity 0.2s ease;
}

.recharts-bar-rectangle:hover {
	opacity: 0.8;
}

.recharts-pie-sector {
	transition: opacity 0.2s ease;
}

.recharts-pie-sector:hover {
	opacity: 0.8;
}

.recharts-area-curve {
	transition: opacity 0.2s ease;
}

.recharts-area-curve:hover {
	opacity: 0.8;
}

/* Chart container styling */
.chart-container {
	border-radius: var(--radius);
	overflow: hidden;
}

/* Terminal-style chart headers */
.chart-header {
	border-bottom: 1px solid hsl(var(--border));
	padding: 0.75rem 1rem;
	background: hsl(var(--card));
}

.chart-header-title {
	font-family: var(--font-mono);
	font-size: 0.875rem;
	font-weight: 600;
	color: hsl(var(--foreground));
}

.chart-header-description {
	font-size: 0.75rem;
	color: hsl(var(--muted-foreground));
	margin-top: 0.25rem;
}

/* Chart hover effects */
.chart-card {
	transition: all 0.2s ease;
	border: 1px solid hsl(var(--border));
	border-radius: var(--radius);
	overflow: hidden;
}

.chart-card:hover {
	border-color: hsl(var(--primary));
	box-shadow: 0 0 0 1px hsl(var(--primary) / 0.1);
}

/* Chart loading state */
.chart-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 300px;
	color: hsl(var(--muted-foreground));
	font-family: var(--font-mono);
	font-size: 0.875rem;
}

/* Chart error state */
.chart-error {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 300px;
	color: hsl(var(--destructive));
	font-family: var(--font-mono);
	font-size: 0.875rem;
}
